<template>
  <div class="app-container">
    <div class="app-container-flex">
      <NewFullScreen
        v-model="showDialog"
        title="消耗登记撤回"
        :btn-list="btnList"
        :need-return="orderId ? true : false"
      >
        <div class="model-panel">
          <div class="model-panel-title">
            <p>{{ $t('basic_information') }}</p>
          </div>
          <div class="model-panel-body">
            <!-- form -->
            <page-form
              class="paddingBox order-model-formBox flex_wrap_start_start"
              v-model:ref-obj="formInfo.ref"
              :disabled="formInfo.disabled"
              :data="formInfo.data"
              :field-list="formInfo.fieldList"
              :rules="formInfo.rules"
              :label-width="formInfo.labelWidth"
            >
            </page-form>
          </div>
        </div>
        <div class="model-panel">
          <div class="model-panel-title">
            <Tooltip :text="$t('detailInfo')"></Tooltip>
          </div>
          <div class="model-panel-body">
            <!-- 条件栏 -->
            <div class="filter-wrapper">
              <page-filter :filter-list="filterInfo.list">
                <template v-slot:filter-addProduct>
                  <el-button @click="addProduct">添加产品</el-button>
                </template>
                <template v-slot:filter-removeProduct>
                  <el-button
                    :disabled="!canRemoveProduct"
                    @click="removeProduct()"
                    >删除产品</el-button
                  >
                </template>
              </page-filter>
              <div class="display-flex">
                <el-button @click="preferenceInfo.visible = true"
                  >偏好设置</el-button
                >
              </div>
            </div>

            <div class="flex_full_item">
              <el-form ref="tableForm" :model="tableInfo" style="width: 100%">
                <!-- 表格 -->
                <page-table
                  :refresh="tableInfo.refresh"
                  :init-curpage="tableInfo.initCurpage"
                  v-model:data="tableInfo.data"
                  :pager="false"
                  :summary="true"
                  :summary-field-list="tableInfo.summaryFieldList"
                  :tab-index="true"
                  :checkbox="true"
                  :isRowClickSelect="true"
                  :field-list="tableInfo.fieldList"
                  :handle="tableInfo.handle"
                  :row-class-name="tableRowClassName"
                  :isDynamic="true"
                  @handleEvent="handleEvent"
                >
                  <template v-slot:col-invalidQty="scope">
                    <template v-if="!tableInfo.isSysGroup">
                      <el-form-item
                        v-if="
                          scope.row.codeType === 1 || scope.row.codeType === 4
                        "
                        class="margin-bottom"
                      >
                        <div class="page-table-input-number-wrapper">
                          <div class="page-table-input-number-left">
                            <div class="page-table-input-number-item">
                              <el-form-item
                                :prop="`data.${scope.$index}.largeUnitQty`"
                                :rules="
                                  scope.$index >= 0
                                    ? [
                                        {
                                          validator:
                                            $validate.positiveAndZero(),
                                          trigger: 'blur',
                                        },
                                      ]
                                    : []
                                "
                              >
                                <el-input-number
                                  v-model.lazy="scope.row.largeUnitQty"
                                  style="width: 100%; margintop: 18px"
                                  clearable
                                  controls-position="right"
                                  :precision="
                                    scope.row.qtyOperateMode === 0 ||
                                    scope.row.qtyOperateMode === 2
                                      ? 0
                                      : systemConfig.qty_show_precision
                                  "
                                  :min="0"
                                  :max="largeMax(scope.row)"
                                  @change="
                                    changeLarge(
                                      $event,
                                      scope.row,
                                      `data.${scope.$index}.largeUnitQty`
                                    )
                                  "
                                />
                              </el-form-item>
                              <div class="page-table-input-number-item-unite">
                                {{ scope.row.unitName }}
                              </div>
                            </div>
                            <div
                              v-if="
                                scope.row.unitConvertCoefficient > 1 &&
                                scope.row.qtyOperateMode === 2
                              "
                              class="page-table-input-number-item"
                            >
                              <el-form-item>
                                <el-input-number
                                  v-model.lazy="scope.row.smallUnitQty"
                                  style="width: 100%; margintop: 18px"
                                  clearable
                                  controls-position="right"
                                  :precision="0"
                                  :min="0"
                                  :max="smallMax(scope.row)"
                                />
                              </el-form-item>
                              <div class="page-table-input-number-item-unite">
                                {{ scope.row.calcUnitName }}
                              </div>
                            </div>
                          </div>
                          <div
                            v-if="scope.row.qtyOperateMode === 2"
                            class="page-table-input-number-right"
                          >
                            {{ $fn.qtyFormatter(scope.row.invalidQty) }}
                          </div>
                        </div>
                      </el-form-item>
                      <span
                        v-else-if="
                          scope.row.codeType === 2 || scope.row.codeType === 3
                        "
                        >{{ $fn.qtyFormatter(scope.row.invalidQty) }}</span
                      >
                    </template>
                    <span v-else>{{
                      $fn.qtyFormatter(scope.row.invalidQty)
                    }}</span>
                  </template>
                </page-table>
              </el-form>
            </div>
          </div>
        </div>
      </NewFullScreen>
    </div>
    <select-depot
      v-if="selectDepotInfo.visible"
      v-model:show-dialog="selectDepotInfo.visible"
      :check-box="false"
      :query="selectDepotInfo.query"
      :highlight-row="true"
      :check-lock="true"
      :save-empty="true"
      @callback="selectDepotCallBack"
    />

    <select-depot-storage
      v-if="selectDepotStorageInfo.visible"
      v-model:show-dialog="selectDepotStorageInfo.visible"
      :query="selectDepotStorageInfo.query"
      :left-table-key="selectDepotStorageInfo.leftTableKey"
      :right-table-key="selectDepotStorageInfo.rightTableKey"
      :api="selectDepotStorageInfo.api"
      :exclude-query-list="selectDepotStorageInfo.excludeQueryList"
      :show-price="$permission('consumeRevoke:price')"
      @callback="selectDepotStorageCallBack"
    />
    <!-- 选择部门 -->
    <select-dept
      v-if="deptInfo.visible"
      v-model:show-dialog="deptInfo.visible"
      :query="deptInfo.query"
      :check-box="false"
      :highlight-row="true"
      :save-empty="true"
      @callback="selectDeptCallback"
    />
    <individual
      v-if="individualInfo.visible"
      v-model:visible="individualInfo.visible"
      v-model:left-query-obj="individualInfo.leftQuery"
      v-model:right-query-obj="individualInfo.rightQuery"
      v-model:info-list="individualInfo.productInfo"
      :request-right-list="!!orderId"
      :left-table-key="individualInfo.leftTableKey"
      v-model:right-api="individualInfo.rightApi"
      v-model:left-api="individualInfo.leftApi"
      v-model:right-vo="individualInfo.rightVo"
      :show-price="$permission('consumeRevoke:price')"
      @callback="selectedProductDetails"
    />
    <SetPreferenceNoQuery
      v-if="preferenceInfo.visible"
      v-model:visible="preferenceInfo.visible"
      :search-list="filterInfo.searchList"
      :field-list="tableInfo.fieldList"
      :customize-user-v-o="filterInfo.query.customizeUserVO"
      :group-level-show="false"
      @callback="setPreferenceCallback"
    />
  </div>
</template>

<script setup name="consumeRevoke">
import PageTable from '@/components/PageTable/index'
import PageFilter from '@/components/PageFilter/index'
import selectDepot from '@/components/SelectDepot/index'
import SelectDepotStorage from '@/components/SelectOrderDepotStock/index'
import individual from './individual'
import SetPreferenceNoQuery from '@/components/SetPreference/setPreferenceNoQuery'
// import setPreference from './setPreference'
import {
  consumeDetailsInsertRevoke,
  getConsumeOrderDetailCustomizeListAll,
  getConsumeOrderDetailCustomizeListPage,
} from '@/api/stock'
import { getCustomizeSetting, updateUserCustomize } from '@/api/customize'
import selectDept from '@/components/SelectDept/index'
import {
  setDisableTime,
  _getCurrentFiscalPeriod,
} from '@/common/js/dateOperation'
const emits = defineEmits()
const { proxy } = getCurrentInstance()
const Tooltip = defineAsyncComponent(() => import('@/components/Tooltip/index'))

const props = defineProps(['visible', 'orderId', 'ids'])

const systemConfig = ref(proxy.$store.state.permission.systemConfig)
const btnList = ref([{ label: '撤回', event: consume, show: true }])
const id = ref('')
const formRefs = ref('')
const slipSelectRequest = ref(true)
// 过滤相关配置
const filterInfo = reactive({
  query: {
    customizeUserVO: {},
    queryMap: {
      orderId: {
        queryType: 'EQUALS',
        value: proxy.orderId || '',
      },
      id: {
        queryType: 'IN',
        value: props.ids || '',
      },
    },
    queryParams: {
      isSelectRevocable: 1,
    },
  },
  list: [
    { type: 'slot', value: 'addProduct' },
    { type: 'slot', value: 'removeProduct' },
  ],
})

// 表格相关
const tableInfo = reactive({
  refresh: 1,
  initCurpage: 1,
  data: [],
  map: new Map(),
  isSysGroup: true, //新增修改页是否有后端合并
  sysGroup: [], //新增修改页后端合并项
  selections: [],
  summaryFieldList: [
    { value: 'invalidQty', formatter: proxy.$fn.qtyFormatter },
    { value: 'price', show: 'false' },
    { value: 'sumAmount', formatter: proxy.$fn.TripartiteMethod },
  ],
  fieldList: [],
  handle: {
    fixed: 'right',
    label: '操作',
    width: '100',
    btList: [
      {
        label: '个体操作',
        event: selectIndividual,
        show: true,
        ifRender: ifRenderValue,
      },
      {
        label: '删除',
        event: removeProduct,
        popconfirmText: '删除后将改变数据,是否继续？',
        show: true,
      },
    ],
  },
})
//表单相关
const formInfo = ref({
  ref: null,
  data: {},
  fieldList: [
    {
      label: '业务日期',
      value: 'businessDate',
      type: 'date',
      clearable: false,
    },
  ],
  rules: {
    businessDate: [
      { required: true, message: '请选择业务日期', target: 'blur' },
    ],
  },
  labelWidth: '120px',
})
//表单相关
const selectDepotInfo = reactive({
  visible: false,
  query: {
    depotAuth: 'id',
    status: 1,
    useTypeId: 1,
  },
})
const selectDepotStorageInfo = reactive({
  leftTableKey:
    'stockConsumeRevokeAddProductLeft-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
  rightTableKey:
    'stockConsumeRevokeAddProductRight-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
  api: getConsumeOrderDetailCustomizeListPage,
  //库存产品
  visible: false,
  excludeQueryList: [], //库存产品左侧过滤配置
  query: {
    queryMap: {
      orderId: {
        queryType: 'EQUALS',
        value: proxy.orderId || '',
      },
    },
    queryParams: {
      isSelectRevocable: 1,
    },
  },
})
const individualInfo = reactive({
  visible: false,
  selectObj: {}, //库存产品弹窗左边后端合并项
  productInfo: {}, //个体操作的当前这条数据
  leftQuery: {
    orderId: {
      queryType: 'EQUALS',
      value: proxy.orderId || '',
    },
  }, //个体弹窗左边数据查询条件
  rightQuery: {
    orderId: {
      queryType: 'EQUALS',
      value: proxy.orderId || '',
    },
  }, //个体弹窗右边数据查询条件
  leftTableKey:
    'stockConsumeRevokeAddProductRight-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
  rightApi: getConsumeOrderDetailCustomizeListAll, //个体弹窗右边数据接口
  leftApi: getConsumeOrderDetailCustomizeListPage, //个体弹窗左边数据接口
  rightVo: {}, //个体弹窗右边配置
})
const deptInfo = reactive({
  visible: false,
  query: {
    deptAuth: 'id',
    status: '1',
  },
})
const preferenceInfo = reactive({
  visible: false,
})

const showDialog = computed({
  get() {
    return props.visible
  },
  set(newValue) {
    emits('update:visible', newValue) // 更新父组件visible
  },
})

const canSave = computed(() => {
  return tableInfo.data.length
})
const canRemoveProduct = computed(() => {
  return tableInfo.selections.length
})

watch(
  () => tableInfo.data,
  (val) => {
    if (val.length && !tableInfo.isSysGroup) {
      tableInfo.data.forEach((row) => {
        let smallUnitQty = parseFloat(row.smallUnitQty || 0)
        let unitConvertCoefficient = parseFloat(row.unitConvertCoefficient || 1)
        let largeUnitQty = parseFloat(row.largeUnitQty || 0)
        let invalidCalcQty = proxy.$fn.accAdd(
          proxy.$fn.accMul(largeUnitQty, unitConvertCoefficient),
          smallUnitQty
        )
        let invalidQty = proxy.$fn.accDiv(
          invalidCalcQty,
          unitConvertCoefficient
        )
        row['invalidCalcQty'] = invalidCalcQty
        row['invalidQty'] = invalidQty
        row.sumAmount = proxy.$fn.accDiv(
          proxy.$fn.accMul(invalidCalcQty, parseFloat(row.price)),
          unitConvertCoefficient
        )
        if (row.details && row.details.length) {
          row.details[0].invalidQty = invalidQty
          row.details[0].invalidCalcQty = invalidCalcQty
          row.details[0].largeUnitQty = largeUnitQty
          row.details[0].smallUnitQty = smallUnitQty
          row.details[0].sumAmount = row.sumAmount
        }
      })
    }
  },
  {
    deep: true,
  }
)

let obj = {
  invalidQty: {
    label: '消耗数量',
    value: 'invalidQty',
    type: 'slot',
    minWidth: '250px',
  },
  price: {
    label: '单价',
    value: 'price',
    minWidth: '150px',
    type: 'column',
    formatter: proxy.$fn.TripartiteMethod,
    permission: !proxy.$permission('consumeRevoke:price'),
    hidden: true,
  },
  sumAmount: {
    label: '总金额',
    value: 'sumAmount',
    type: 'column',
    formatter: proxy.$fn.TripartiteMethod,
    permission: !proxy.$permission('consumeRevoke:price'),
    hidden: true,
  },
  defaultSupplierPrice: {
    label: '默认供应商价格',
    value: 'defaultSupplierPrice',
    type: 'column',
    permission: !proxy.$permission('consumeRevoke:price'),
    formatter: proxy.$fn.TripartiteMethod,
    hidden: true,
  },
  orderNo: {
    label: '单号',
    value: 'orderNo',
    componentType: 'input',
    show: false,
    hidden: true,
  },
}
tableInfo.fieldList = Object.values({
  ...proxy.$fn.deepClone(proxy.$fieldfList.FieldList),
  ...obj,
})
getCustomize()
getInvdividualRightCustomize()

let disStartDate = ref('')
let disEndDate = ref('')
setDisableTime(formInfo.value.fieldList, disStartDate, disEndDate)
async function setBusinessDate() {
  formInfo.value.data.businessDate = await _getCurrentFiscalPeriod(
    formInfo.value.fieldList,
    proxy,
    disStartDate,
    disEndDate
  )
}

onMounted(() => {
  if (proxy.orderId) {
    getList()
  }
  formRefs.value = [proxy.$refs['tableForm']]
})

function setPreferenceCallback(obj) {
  updateUserCustomize(obj.customizeUserVO).then((res) => {
    if (res && res.success) {
      getCustomize(!slipSelectRequest.value)
    }
  })
}
function largeMax(row) {
  if (row.qtyOperateMode === 2) {
    return parseInt(row.canInvalidCalcQty / row.unitConvertCoefficient)
  } else {
    return row.canInvalidQty
  }
}
function smallMax(row) {
  let largeUnitQty = parseInt(
    row.canInvalidCalcQty / row.unitConvertCoefficient
  )
  if (largeUnitQty === 0 || row.largeUnitQty === largeUnitQty) {
    return parseInt(row.canInvalidCalcQty % row.unitConvertCoefficient)
  } else {
    return row.unitConvertCoefficient - 1
  }
}
function changeLarge(e, row, str) {
  proxy.$refs.tableForm.clearValidate(str)
  let largeUnitQty = parseInt(
    row.canInvalidCalcQty / row.unitConvertCoefficient
  )
  if (row.qtyOperateMode === 2 && row.unitConvertCoefficient > 1) {
    if (largeUnitQty > 0 && e === largeUnitQty) {
      let smallUnitQty = parseInt(
        row.canInvalidCalcQty % row.unitConvertCoefficient
      )
      if (row.smallUnitQty > smallUnitQty) {
        row.smallUnitQty = smallUnitQty
      }
    }
  }
}
function tableRowClassName({ row = undefined }) {
  if (row.isChoice) {
    return 'success-row'
  } else {
    return ''
  }
}
function ifRenderValue() {
  return tableInfo.isSysGroup
}

async function selectIndividual(data) {
  //选择个体
  await getIndividualInfoQuery(data)
  individualInfo.visible = true
}
async function getIndividualInfoQuery(data) {
  // 设置个体操作参数

  for (let key in individualInfo.selectObj) {
    individualInfo.selectObj[key].value = data[key]
  }
  individualInfo.leftQuery.id = {
    queryType: 'NOT_IN',
    queryCategory: 'AND',
    value: data.groupConcatIds,
  }
  individualInfo.leftQuery.productId = {
    queryType: 'EQUALS',
    queryCategory: 'AND',
    value: data.productId,
  }
  individualInfo.leftQuery = {
    ...individualInfo.leftQuery,
    ...individualInfo.selectObj,
  }
  individualInfo.rightQuery.id = {
    queryType: 'IN',
    queryCategory: 'AND',
    value: data.groupConcatIds,
  }
  individualInfo.rightQuery.orderId = {
    queryType: 'EQUALS',
    queryCategory: 'AND',
    value: proxy.orderId,
  }
  individualInfo.productInfo = data
  return
}
async function selectedProductDetails(data) {
  //个体返回
  if (data.details && data.details.length) {
    tableInfo.map.set(data.key, data)
    let index = tableInfo.data.findIndex((item) => item.key === data.key)
    if (index !== -1) {
      tableInfo.data[index] = data
    }
  } else {
    removeProduct(data)
  }
}

// 触发事件
function handleEvent(event, data) {
  switch (event) {
    case 'tableCheck':
      tableInfo.selections = [...data]
      break
  }
}
function consume() {
  proxy.$fn.checkForm(formRefs.value).then(() => {
    const newDetails = tableInfo.data.filter(
      (row) => row.productId && row.invalidQty > 0
    )

    if (!newDetails.length) {
      proxy.$message({
        message: '请添加有效的产品',
        type: 'warning',
        duration: 3500,
        showClose: true,
      })
      return
    }
    let details = proxy.$fn.filterBlacklist(newDetails)
    details.forEach((element,index) => {
      details[index] = { ...element, ...formInfo.value.data }
    })
    consumeDetailsInsertRevoke(details).then((resp) => {
      if (resp && resp.success) {
        tableInfo.data = []
        selectDepotStorageInfo.excludeQueryList = []
        tableInfo.map = new Map()
        if (proxy.orderId) {
          showDialog.value = false
          emits('returnModify', false)
        }
      }
    })
  })
}
//选择仓库
function selectStoreDepot() {
  selectDepotInfo.visible = true
}
function selectConsumeDept() {
  deptInfo.visible = true
}

//选择库存产品
function addProduct() {
  let keys = [...tableInfo.map.keys()]
  let excludeQueryList = []
  if (keys.length && tableInfo.sysGroup.length) {
    excludeQueryList = keys.map((item) => JSON.parse(item))
  }
  selectDepotStorageInfo.excludeQueryList = excludeQueryList //库存产品左侧过滤配置
  selectDepotStorageInfo.visible = true
}
async function selectDepotStorageCallBack(rows = []) {
  //库存产品返回

  let map = await proxy.$fn.getDepotStorageRevoke(
    rows,
    tableInfo.sysGroup,
    tableInfo.map,
    getConsumeOrderDetailCustomizeListAll, //个体弹窗右边数据接口
    proxy.orderId,
    individualInfo.rightVo, //个体弹窗右边表格配置
    'canInvalidCalcQty',
    'id'
  )
  tableInfo.map = map
  tableInfo.data = [...map.values()]
}
//删除产品
function removeProduct(row = undefined) {
  if (row && row.key) {
    tableInfo.data = tableInfo.data.filter((item) => item.key !== row.key)
    let key = row.key
    tableInfo.map.delete(key)
  } else {
    proxy
      .$confirm('删除后将改变数据,是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
      .then(() => {
        tableInfo.selections.forEach((row) => {
          for (let [key, value] of tableInfo.map) {
            if (key === row.key) {
              tableInfo.map.delete(key)
            }
          }
        })
        tableInfo.data = tableInfo.data.filter((row) => {
          return !tableInfo.selections.includes(row)
        })
      })
  }
}
function getCustomize(_slipSelectRequest = true) {
  let param = {
    tableKey:
      'stockConsumeRevokeModify-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
  }
  tableInfo.isSysGroup = false
  getCustomizeSetting(param).then((res) => {
    if (res && res.success) {
      let data = res.data
      tableInfo.fieldList = proxy.$fn.setFieldList(
        tableInfo.fieldList,
        data.detail
      )
      for (let key in data.detail) {
        if (data.detail[key].sysGroupLevel > 0) {
          tableInfo.isSysGroup = true
        }
      }
      slipSelectRequest.value = _slipSelectRequest
      filterInfo.query.customizeUserVO = data
      getDeoptLeftCustomize()
    }
  })
}
function getList() {
  //修改请求明细信息
  if (!Object.keys(filterInfo.query.customizeUserVO).length) {
    let param = {
      tableKey:
        'stockConsumeRevokeModify-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
    }
    tableInfo.isSysGroup = false
    getCustomizeSetting(param).then((res) => {
      if (res && res.success) {
        let data = res.data
        filterInfo.query.customizeUserVO = data
        for (let key in data.detail) {
          if (data.detail[key].sysGroupLevel > 0) {
            tableInfo.isSysGroup = true
          }
        }
        getListData()
      }
    })
    return
  } else {
    getListData()
    return
  }
}
function getListData() {
  getConsumeOrderDetailCustomizeListAll(filterInfo.query).then((resp) => {
    if (resp && resp.success && resp.data.length) {
      let data = resp.data
      data.forEach((item) => {
        //将返回的数据变成Map形式
        let key = []
        item.invalidCalcQty = item.canInvalidCalcQty
        item.invalidQty = item.canInvalidQty
        item.largeUnitQty = parseInt(
          item.invalidCalcQty / item.unitConvertCoefficient
        )
        item.smallUnitQty = parseInt(
          item.invalidCalcQty % item.unitConvertCoefficient
        )
        tableInfo.sysGroup.forEach((row) => {
          let obj = {}
          obj.columnName = row.columnName
          obj.asTbName = row.asTbName
          obj.value = item[row.key]
          key.push(obj)
        })

        item.key = JSON.stringify(key)
        if (!tableInfo.isSysGroup) {
          item.groupConcatDepotStockIds = item.depotStockId.toString()
          item.groupSize = 1
          let row = proxy.$fn.deepClone(item)
          delete row.key
          item.details = [row]
        }
        tableInfo.map.set(item.key, item)
      })
      tableInfo.data = data
      setBusinessDate()
    }
  })
}
function getDeoptLeftCustomize() {
  //库存产品弹窗左侧配置
  let param = {
    tableKey:
      'stockConsumeRevokeAddProductLeft-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
  }
  getCustomizeSetting(param).then((res) => {
    if (res && res.success) {
      let data = res.data
      let arr = []
      let obj = {}
      if (tableInfo.isSysGroup) {
        for (let key in data.detail) {
          if (data.detail[key].sysGroupLevel > 0) {
            arr.push({
              columnName: data.detail[key].columnName,
              asTbName: data.detail[key].asTbName,
              key: key,
            })
            obj[key] = {
              queryType: 'EQUALS',
              queryCategory: 'AND',
              ignoreEmptyValue: false,
              value: null,
            }
          }
        }
      } else {
        arr.push({
          columnName: data.detail.id.columnName,
          asTbName: data.detail.id.asTbName,
          key: 'id',
        })
        obj['id'] = {
          queryType: 'EQUALS',
          queryCategory: 'AND',
          value: null,
        }
        setBusinessDate()
      }
      individualInfo.selectObj = obj
      tableInfo.sysGroup = arr
    }
  })
}
function getInvdividualRightCustomize() {
  //获取个体弹窗右边配置
  let param = {
    tableKey:
      'stockConsumeRevokeModifySingle-com.slip.spd.entity.vo.stock.ConsumeOrderDetailVO',
  }
  getCustomizeSetting(param).then((res) => {
    if (res && res.success) {
      individualInfo.rightVo = res.data
    }
  })
}
</script>

<style scoped lang="scss">
:deep(.page-table) > .el-table {
  overflow: hidden;
}
</style>
